import Vue from 'vue'
import Router from 'vue-router'
import login from "../components/login.vue"
import repair from "../components/repair.vue"
import myrepair from "../components/myrepair.vue"
import Index from "../components/Index.vue"
import register from '../components/Register.vue'
import ServiceGuide from '../components/ServiceGuide.vue'
import meterial from '../components/material.vue'
import PersonalCenter from '../components/PersonalCenter.vue'
import PersonalInformation from '../components/PersonalInformation.vue'
import SetPersonalInformation from '../components/SetPersonalInformation.vue'
import GuidanceAdd from '../components/GuidanceAdd.vue'
import Notice from '../components/Notice.vue'
import notice_detail from '../components/notice_detail.vue'
import addNotice from '../components/addNotice.vue'
import SetPhone from '../components/SetPhone.vue'
import SetEmail from '../components/SetEmail.vue'
import SetAccountName from '../components/SetAccountName.vue'
// import SetPassword from '../components/SetPassword.vue'
// import Notice from '../components/Notice.vue'
//import notice_detail from '../components/notice_detail.vue'

import repairpeople from '../components/repairpeople.vue'
import SetPassword from '../components/SetPassword.vue'
import AccountManageement from '../components/AccountManagement.vue'

Vue.use(Router)

export default new Router({
  routes: [{
      path: "/index",
      component: Index,

    },

    { //登录
      path: "/login",
      component: login
    },
    { //注册
      path: "/register",
      component: register,

    },
    { //服务指南
      path: "/serviceGuide",
      component: ServiceGuide
    },
    {//个人中心
    	path:"/PersonalCenter",
    	component:PersonalCenter,
      children:
      [
        {//个人信息展示
          path:"/PersonalInformation",
          component:PersonalInformation
        },
        // {//修改个人信息
        //   path:"/SetPersonalInformation",
        //   component:SetPersonalInformation
        // },
        {//修改电话
          path:"/SetPhone",
          component:SetPhone
        },
        {//修改邮箱
          path:"/SetEmail",
          component:SetEmail
        },
        {//修改用户名
          path:"/SetAccountName",
          component:SetAccountName
        },
        {//修改密码
          path:"/SetPassword",
          component:SetPassword
        },
        //添加维修工
        {
          path:"/repairpeople",
          component:repairpeople,
        },
        //添加通知公告
        {
        path:"/addNotice",
        component:addNotice,
        },
        //添加服务指南
        {
        path:"/GuidanceAdd",
        component:GuidanceAdd,
        },
        //账号管理
        {
        path:"/AccountManageement",
        component:AccountManageement,
        },
      ]
    },
    {
      path: "/repair",
      component: repair
    },
    {
      path: "/myrepair",
      component: myrepair,
    },
    {
      path: "/meterial",
      component: meterial,
    },
    // //添加服务指南
    // {
    //   path:"/guidanceAdd",
    //   component:GuidanceAdd
    // },

    //通知中心
    {
      path:"/notice",
      component:Notice
    },
    {
      path:"/notice_detail",
      component:notice_detail
    }
  ]
})
